<template>
  <div>
    <van-cell-group>
      <van-cell 
      :to="{
        name:'articledetails',
        params:{
          ur_id:data.art_id
        }
      }"
      >
        <span slot="title">{{data.title}}</span>
        <div slot="label">
          <div class="snageTub" v-if="data.cover.type === 3">
            <div class="sange"
                v-for="(item,index) in data.cover.images"
                :key=index
            >
              <van-image
                
                fit="cover"
                
                :src="item"
              />
            </div>
          </div>
          <div class="lastDiv">
            <span>{{data.aut_name}}</span>
           
            <span>{{data.comm_count}}评论</span>
          
            <span>{{data.pubdate | relativeTime}}</span>
          </div>
        </div>

        <div>
          <van-image
            width="116px"
            height="73px"
            fit="cover"
            v-if="data.cover.type === 1"
            :src="data.cover.images[0]"
          />
        </div>
      </van-cell>
    </van-cell-group>
  </div>
</template>
<script>
import '@/utils/dayjs'
export default {
  name: "Thearticlelists",
  props: {
    data: {
      type: Object,
      required: true,
    },
  },
  created() {
    // console.log(this.data);
  },
};
</script>
<style scoped lang="less">
/deep/.van-cell__title {
    font-size: 16px;
    color: #3a3a3a;

}
/deep/.van-cell__value {
    flex: unset;
    width: 116px;
    margin-right: 12px;
    height: 73px;

}
.snageTub {
    padding-top:15px ;
    padding-bottom:15px ;
    display: flex;
    .sange {
        flex: 1;
        &:not(:last-child){
            padding-right:4px ;
        }
    }
    
}
.lastDiv {
    span {
        margin-right: 12px;
    }
}


</style>